﻿using System;
using System.Collections.Generic;

namespace Project1
{
	/// <summary>
	/// An interface for an abstract search problem.
	/// </summary>
	public interface IProblem
	{
		/// <summary>
		/// Gets the successors states reachable from the supplied <paramref name="state"/>.
		/// </summary>
		/// <param name="state">The state from which the successors should be generated.</param>
		/// <returns>A list of successor states.</returns>
		IEnumerable<State> GetSuccessors(State state);

		/// <summary>
		/// Determines whether the specified state is a goal state.
		/// </summary>
		/// <param name="state">The state.</param>
		/// <returns>
		///   <c>true</c> if the specified state is a goal state; otherwise, <c>false</c>.
		/// </returns>
		bool IsGoal(State state);

		/// <summary>
		/// Gets the initial state.
		/// </summary>
		State InitialState { get; }

		/// <summary>
		/// Gets the goal state.
		/// </summary>
		/// <value>
		/// The goal state.
		/// </value>
		/// <remarks>Currently it's assumed that there's only one goal state.</remarks>
		State GoalState { get;  }

		/// <summary>
		/// Returns a <see cref="System.String"/> that represents this instance.
		/// </summary>
		/// <param name="keys">An array with the coordinates of cells that should be specifically marked.</param>
		/// <returns>
		/// A <see cref="System.String"/> that represents this instance.
		/// </returns>
		/// <remarks>This method can be used to draw a solution path.</remarks>
		string ToString(Object[] keys);
	}
}
